<template>
  <div class="float-div-container" :style="position">
    <p>设备类型:xxx设备</p>
    <p>设备ip: 192.168.2.1</p>
    <p>设备状态: 0</p>
  </div>
</template>

<script>
import echarts from 'echarts'
require('echarts/theme/macarons') // echarts theme
export default {
  data () {
    return {
      
    };
  },
  // 接受一个位置坐标
  props: ['clientX','clientY'],
  computed: {
    myDate(){
      var dateObj= new Date()
      return dateObj.getFullYear()+"年"+(dateObj.getMonth()+1)+'月'+dateObj.getDate()+'日'
    },
    position(){
      return {
        left: this.clientX+'px',
        top: this.clientY+'px'
      }
    }
  },
  mounted(){
  },
  methods: {
  }
}
</script>

<style lang="scss" scoped>
.float-div-container{
  position: absolute;
  left: 150px;
  background-color:rgba($color: #000000, $alpha: 0.3) ;
  border-radius: 5px;
  padding: 10px;
}
.float-div-container p{
  color: #000;
  font-size: 10px;
}
</style>